package com.gitee.cashzhang27.test.sdk.bestsign.domain.request;

import cn.hutool.http.Method;
import com.gitee.cashzhang27.test.sdk.bestsign.domain.AbstractBestSignRequest;
import com.gitee.cashzhang27.test.sdk.bestsign.domain.BestSignRequest;
import com.gitee.cashzhang27.test.sdk.bestsign.domain.response.TemplateGetTemplateVarsResponse;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * 获取模版变量
 *
 * @author Cash Zhang
 * @version v1.0
 * @since 2019/08/09 16:47
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class TemplateGetTemplateVarsRequest extends AbstractBestSignRequest implements
    BestSignRequest<TemplateGetTemplateVarsResponse> {

  /**
   * 模板变量
   */
  private String tid;
  /**
   * 是否获取所有变量
   * 0 只返回变量的 type 和 name；
   * 1 返回变量的所有字段；
   */
  private String isRetrieveAllVars;

  @Override
  public String getMethodName() {
    return "/template/getTemplateVars/";
  }

  @Override
  public Method getMethodType() {
    return Method.POST;
  }

  @Override
  public Class<TemplateGetTemplateVarsResponse> getResponseClass() {
    return TemplateGetTemplateVarsResponse.class;
  }
}
